# !/usr/bin/env python
# -*- coding: utf-8 -*-
import pandas as pd

if __name__ == '__main__':
    data = [['Tom', 10],
            ['Nick', 15],
            ['John', 16]]


    # data_raw = pd.DataFrame(data, columns=['Name', 'Age'])
    # print("list", data_raw)

    data_raw = pd.read_csv(r'./data/data.csv', encoding='utf-8')

    data_raw.head()

    print("原始DataFrame的大小:", data_raw.shape)

    replication_factor = 4

    # 重复DataFrame的每一行，以生成更多的样本
    df_repeated = pd.concat([data_raw for _ in range(replication_factor)])

    print("DataFrame的大小:", df_repeated.shape)

    print(df_repeated)

    df_repeated.to_csv(r'./out/data.csv', index=False, encoding='utf-8')

    data_raw.drop(['Age'], axis=1, inplace=True)
    data_raw.to_csv(r'./out/data2.csv', index=False, encoding='utf-8')


